package com.fishery.logistics.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author run
 * @since 2021-01-23
 */
@TableName("t_logistics_order")
@ApiModel(value="LogisticsOrder对象", description="物流订单")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单编号")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "物流订单创建者")
    private String logisticsOrderCreateBy;

    @ApiModelProperty(value = "物流订单状态,0（途中）或1（送达）")
    @TableField(fill = FieldFill.INSERT)
    private Integer logisticsOrderStatus;

    @ApiModelProperty(value = "出发站的编号")
    private String logisticsStartStationId;

    @ApiModelProperty(value = "出发站信息")
    @TableField(exist = false)
    private Station logisticsStartStation;

    @ApiModelProperty(value = "抵达站的编号")
    private String logisticsArrivalStationId;

    @ApiModelProperty(value = "抵达站信息")
    @TableField(exist = false)
    private Station logisticsArrivalStation;

    @ApiModelProperty(value = "基地id")
    private String baseId;

    @ApiModelProperty(value = "产品编号")
    private String productId;

    @ApiModelProperty(value = "版本号（乐观锁）")
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    @ApiModelProperty(value = "逻辑删除（0未删除，1删除）")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLogisticsOrderCreateBy() {
        return logisticsOrderCreateBy;
    }

    public void setLogisticsOrderCreateBy(String logisticsOrderCreateBy) {
        this.logisticsOrderCreateBy = logisticsOrderCreateBy;
    }

    public Integer getLogisticsOrderStatus() {
        return logisticsOrderStatus;
    }

    public void setLogisticsOrderStatus(Integer logisticsOrderStatus) {
        this.logisticsOrderStatus = logisticsOrderStatus;
    }

    public String getLogisticsStartStationId() {
        return logisticsStartStationId;
    }

    public void setLogisticsStartStationId(String logisticsStartStationId) {
        this.logisticsStartStationId = logisticsStartStationId;
    }

    public Station getLogisticsStartStation() {
        return logisticsStartStation;
    }

    public void setLogisticsStartStation(Station logisticsStartStation) {
        this.logisticsStartStation = logisticsStartStation;
    }

    public String getLogisticsArrivalStationId() {
        return logisticsArrivalStationId;
    }

    public void setLogisticsArrivalStationId(String logisticsArrivalStationId) {
        this.logisticsArrivalStationId = logisticsArrivalStationId;
    }

    public Station getLogisticsArrivalStation() {
        return logisticsArrivalStation;
    }

    public void setLogisticsArrivalStation(Station logisticsArrivalStation) {
        this.logisticsArrivalStation = logisticsArrivalStation;
    }

    public String getBaseId() {
        return baseId;
    }

    public void setBaseId(String baseId) {
        this.baseId = baseId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id='" + id + '\'' +
                ", logisticsOrderCreateBy='" + logisticsOrderCreateBy + '\'' +
                ", logisticsOrderStatus=" + logisticsOrderStatus +
                ", logisticsStartStationId='" + logisticsStartStationId + '\'' +
                ", logisticsStartStation=" + logisticsStartStation +
                ", logisticsArrivalStationId='" + logisticsArrivalStationId + '\'' +
                ", logisticsArrivalStation=" + logisticsArrivalStation +
                ", baseId='" + baseId + '\'' +
                ", productId='" + productId + '\'' +
                ", version=" + version +
                ", isDeleted=" + isDeleted +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }
}
